#!/bin/sh

set -e
set -x

[ $CHAIN_ID ] && CHAIN_ID="--chain-id=$CHAIN_ID"
[ $GETH_RUL ] && GETH_URL="--execution-endpoint=$GETH_RUL"

/usr/local/bin/beacon-chain \
--datadir=/consensus/beacondata \
--min-sync-peers=0 \
--genesis-state=/consensus/genesis.ssz \
--bootstrap-node= \
--interop-eth1data-votes \
--chain-config-file=/consensus/config.yml \
--contract-deployment-block=0 \
$CHAIN_ID \
--rpc-host=0.0.0.0 \
--grpc-gateway-host=0.0.0.0 \
$GETH_RUL \
--accept-terms-of-use \
--jwt-secret=/execution/jwtsecret \
--suggested-fee-recipient=0x123463a4b065722e99115d6c222f267d9cabb524 \
--minimum-peers-per-subnet=0

